import java.lang.reflect.Array;
import java.util.*;

public class BubbleSort {
    public static void mapp(){
        Map<String,Integer> map = new HashMap<String,Integer>();
        map.put("joj", 43);
        System.out.println(map);
        System.out.println(map.get("joj").hashCode());
        System.out.println(map.get("joj"));

    }
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<Integer>();
        Collections.addAll(list, 2, 3, 4, 5, 12, 3, 45, 6, 576, 32, 54, 65, 43223, 42543, 22, 6);
        //1数开始比较，直到N-1
        for (int i = 0; i < list.size(); i++) {
            // 从i+1始，和i位置的数进比
            for (int j = i + 1; j < list.size(); j++) {
                // 记录原来的数
                int tem = list.get(j);
                // 如果i位置的数大，就和j位置的数进交
                if (list.get(i) > tem) {
                    list.set(j, list.get(i));
                    list.set(i, tem);
                }
            }
        }
        System.out.println(list);
        BubbleSort.mapp();
        
    }
}